package com.heima.es.controller;

import com.heima.es.pojo.Result;
import com.heima.es.service.SearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("good")
public class GoodController {

    @Autowired
    private SearchService searchService;

    @GetMapping("search/{page}/{size}")
    public Result searchPageInfo(
            @PathVariable("page") Integer page,
            @PathVariable("size") Integer size,
            @RequestParam("keyword") String keyword
    ){
        System.out.println("1");
        return searchService.searchPageInfo(page,size,keyword);
    }
}
